#include "ZContainer.h"
#include "ZAWays.h"
#pragma once

namespace Zdib
{
	class CMap:public CContainer
	{
	public:
		
		CMap(CContainer *root,CContainer *parent,char *filename);
		virtual ~CMap();
		virtual CImgFile *GetCurImg();
		virtual void Draw();
		virtual CBitBmp *GetMyImg(){return m_Img;};
		virtual bool OnEvent(const TEvent& ev);
		void SetMapPos(int x,int y);
		TPos GetMapPos();
		CObstruct *GetObstruct()
		{
			return m_Obs;
		}
	private:
		int MapX,MapY,OldMapX,OldMapY;
		CImgFile *m_Img;
		CMapFile *m_BgImg;
		CObstruct *m_Obs;
		TDrawPosValue m_BGDPosValue;
		void LoadObstruct();
	};
}